package org.example.jiaxiao.controller;

import org.example.jiaxiao.entity.Course;
import org.example.jiaxiao.service.ManageService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api/manage")
public class ManageController {
    @Autowired
    private ManageService manageService;

    //添加课程
    @RequestMapping("/addCourse")
    public int addCourseInformation(@RequestBody Course course) {
        System.out.println("添加的课程信息: " + course);
        return manageService.addCourseInformation(course);
    }

//    //更新课程
//    @RequestMapping("/updateCourse")
//    public int updateCourseInformation(@RequestBody Course course) {
//        System.out.println("更新的课程信息: " + course);
//        return manageService.updateCourseInformation(course);
//    }


}
